package com.lans;

import com.lans.constant.Constant;
import com.lans.thread01.MyThread;

import java.util.Random;

public class MainMenu {
    public static void main(String[] args) {
//        eatWhat();
        MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();
        t1.setName("线程1");
        t2.setName("线程2");
        t1.start();
        t2.start();
    }
    private static void eatWhat() {
        //1.生成一个随机数
        Random random = new Random();
        int i = random.nextInt(7) + 1;
        System.out.println(i);
        switch (i) {
            case 1:
                System.out.println(Constant.ONE);
                break;
            case 2:
                System.out.println(Constant.TWO);
                break;
            case 3:
                System.out.println(Constant.THREE);
                break;
            case 4:
                System.out.println(Constant.FOUR);
                break;
            case 5:
                System.out.println(Constant.FIVE);
                break;
            case 6:
                System.out.println(Constant.SIX);
                break;
            case 7:
                System.out.println(Constant.SEVEN);
                break;
        }
    }
}
